home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / chat / ircii-2.8he / ircii-2 / help / ALIAS / quote < prev    next >
Encoding:
Text File  |  1993-05-04  |  1.7 KB  |  42 lines

  1. ALIAS MODIFIER:
  2.   This is a special quoting modifier.  Use of this modifier tells
  3.   IRCII that you wish certain characters in the converted text to be
  4.   quoted using the \ character.  The form of this modifier is:
  5.     $^c<sequence>
  6.   where c is the character to be quoted, and <sequence> is one of the
  7.   special sequences.  For example, you may wish to do the following:
  8.     alias foo eval echo $^$*
  9.   and you do
  10.     foo This is a $Test
  11.   Since $ expressions are parsed first, the $^$* is the first thing
  12.   parsed.  The ^$ part tells IRCII to quote all $ in the resultant
  13.   string.  So, the $^$* is expanded just like $* and becomes:
  14.     This is a $Test
  15.   and the ^$ causes it to quote all $, which becomes:
  16.     This is a \$Test
  17.   This is then replaced in the original alias for parsing, so /foo
  18.   becomes:
  19.     eval echo This is a \$test
  20.   When eval goes through the line and reparses it the $ is protected 
  21.   by the new \, and thus the final output will be "This is a $Test".
  22.   If $ was not quoted, eval would try to expand any $'s into the
  23.   contents of the associated variable.  Eg. one$two  would try to 
  24.   expand the variable $two
  25.   The ^ modifier must be first after the initial $.  You may specify
  26.   more than one character to be quoted simply be adding more ^c to the
  27.   expression:
  28.     $^$^\B
  29.   will quote all occurences of $ and \ in the body of the last message
  30.   you received.
  31.  
  32.   Remember, you can use both forms of modifiers, but they must be in
  33.   the correct order.  All ^ modifiers must be first, followed by any
  34.   [] modifier.  For example:
  35.     $^.[-10]S
  36.   This will right justify your server name and quote any . in the
  37.   server name with \.
  38.  
  39. See Also:
  40.   ALIAS WIDTH
  41.   EVAL
  42.